import request from '@/utils/request'

/**
 * 获取楼宇列表
 * @param { page, pageSize} params
 * @returns
 */

const getBuildingListAPI = params => {
  return request({
    url: 'park/building',
    params
  })
}

// 收集表单数据提交
const createBuildingListAPI = data => {
  return request({
    url: 'park/building',
    method: 'post',
    data
  })
}

// 删除楼宇
const delBuildingListAPI = id => {
  return request({
    url: `park/building/${id}`,
    method: 'delete'
  })
}

// 编辑楼宇
const editBuildingListAPI = data => {
  return request({
    url: 'park/building',
    method: 'put',
    data
  })
}

export {
  getBuildingListAPI,
  createBuildingListAPI,
  delBuildingListAPI,
  editBuildingListAPI
}
